<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no,width=device-width">
    <meta name="format-detection" content="telephone=yes"/>
    <title>报销编辑</title>
    <link rel="stylesheet" href="../../css/reset.css">
    <link rel="stylesheet" href="../../css/base.css">
    <link rel="stylesheet" href="../../css/reimbursement.css">
    <style>
        .form1{width: 100%;height: auto;padding-bottom: 60px;}
    </style>
</head>
<body style="background-color: #ffffff">
<div class="wrapper">
    <div class="box-box">
        <ul class="other b-btm">
            <li class="business11"><span class="select-sp">业务招待</span></li>
            <li class="traffic11"><span>交通</span></li>
            <li class="travel11"><span>差旅</span></li>
            <li class="communication11"><span>通讯</span></li>
            <li class="low"><span>低值易耗品</span></li>
            <li class="other11"><span>其他</span></li>
        </ul>
    </div>
        <form method="post" class="form buss form1">
            <div class="business">
                    <ul class="business-ul">
                        <li class="fz9">
                            <span class="time-sp dis_in f5b">日期：</span>
                            <span class="time-sp1 fr dis_in f5"><input class="business-inp" name="timers" id="demo0" type="text" placeholder="请选择日期"></span>
                        </li>
                        <li class="fz9">
                            <span class="time-sp dis_in f5b">金额：</span>
                            <span class="time-sp1 fr dis_in f5"><input class="business-inp" name="money" id="inp1" type="text" placeholder="补贴标准：50/天"></span>
                        </li>
                        <li class="fz9">
                            <span class="time-sp dis_in f5b">招待场所：</span>
                            <span class="time-sp1 fr dis_in f5"><input id="Venue" name="Venue" class="business-inp" type="text"></span>
                        </li>
                        <li class="fz9">
                            <span class="time-sp dis_in f5b">招待单位：</span>
                            <span class="time-sp1 fr dis_in f5"><input class="business-inp"  name="Company" id="Company" type="text"></span>
                        </li>
                        <li class="fz9">
                            <span class="time-sp dis_in f5b">招待人数：</span>
                            <span class="time-sp1 fr dis_in f5"><input name="number" id="number" class="business-inp" type="text"></span>
                        </li>
                    </ul>
                    <textarea name="Remarks" id="txt1" cols="40" rows="10" placeholder="备注" ></textarea>
                    <ul class="business-ul2 fz9">
                        <li ><span class="delete">删除本条</span></li>
                        <li class="business-li"><span>添加餐费补贴</span></li>
                    </ul>
            </div>
        </form>


   <footer class="business-foot form-actions">
       <input  type="submit" name="submit" id="submit" value="保存" >
   </footer>
</div>
<script src="../../js/jquery-2.1.4.min.js"></script>
<script src="../../js/base.js"></script>
<script src="../../js/data.js"></script>
<script src="//code.jquery.com/jquery-latest.js"></script>
<script src="../../js/reimbursement.js"></script>
<script>

    function pushHistory() {
        var state = {
            title: "报销编辑",
            url: "../Reimbursement/re-business.html"
        };
        window.history.pushState(state, "报销编辑", "../Reimbursement/re-business.html");
    }
    $(function(){
        pushHistory();
        var bool=false;
        setTimeout(function(){
            bool=true;
        },1500);
        window.addEventListener("popstate", function(e) {
            if(bool)
            {
                $('.background').show();
            }
            pushHistory();

        }, false);
    });
    $('.cancel,.sub-sp1').click(function(){
        $('.background').hide();
    });

//    $(document).ready(function () {
//        if (localStorage){
//
//            if (localStorage.timers) {
//                $("#timers").val(localStorage.timers);
//            }
//            if (localStorage.money) {
//                $("#money").val(localStorage.money);
//            }
//            if (localStorage.Venue) {
//                $("#Venue").val(localStorage.Venue);
//            }
//            if (localStorage.Company) {
//                $("#Company").val(localStorage.Company);
//            }
//            if (localStorage.number) {
//                $("#number").val(localStorage.number);
//            }
//            if (localStorage.Remarks) {
//                $("#txt1").val(localStorage.Remarks);
//            }
//            var Venue=storage.getItem("Venue");
//            console.log(Venue);
//            var money=storage.getItem("money");
//            console.log(money);
//            var Company=storage.getItem("Company");
//            console.log(Company);
//            var number=storage.getItem("number");
//            console.log(number);
//            var Remarks=storage.getItem("Remarks");
//            console.log(Remarks);
//
//            /*
//            * 当表单中的值改变时,localstorage的值也改变
//            */
//            $("input[type=text],select,textarea").change(function(){
//                $this = $(this);
//                localStorage[$this.attr("name")] = $this.val();
//            });
//            $("form");
//            /*
//            * 如果表单提交，则调用clear方法
//            */
//               $('#submit') .click(function(key,value){
//                    localStorage.setItem(key);
//                })
//                .change(function(){
//                    console.log(localStorage);
//                });
//        }
//    });

    var calendar = new datePicker();
    calendar.init({
        'trigger': '#demo0', /*按钮选择器，用于触发弹出插件*/
        'type': 'date',/*模式：date日期；datetime日期时间；time时间；ym年月；*/
        'minDate':'1900-1-1',/*最小日期*/
        'maxDate':'2100-12-31',/*最大日期*/
        'onSubmit':function(){/*确认时触发事件*/
            var theSelectData=calendar.value;
        },
        'onClose':function(){/*取消时触发事件*/
        }
    });
</script>
</body>
</html>